$(document).ready(function (){
    $.ajax({
        url:'/exam/getMathQuestionById',
        type:'get',
        data:{examId:1},
        success:function (data){
            $("#L_title").attr("value",data.title)
            $("#L_answerA").attr("value",data.answerA)
            $("#L_answerB").attr("value",data.answerB)
            $("#L_answerC").attr("value",data.answerC)
            $("#L_answerD").attr("value",data.answerD)
            $("#L_realAnswer").attr("value",data.realAnswer)
            $("#L_projectSelectId").attr("value",data.projectSelect)
            $("#L_examYear").attr("value",data.examYear)
            $("#L_isImage").attr("value",data.isImage)
        }
    })

    $("#L_update").click(function (){
        var title = $("#L_title").val()
        var answerA = $("#L_answerA").val()
        var answerB = $("#L_answerB").val()
        var answerC = $("#L_answerC").val()
        var answerD = $("#L_answerD").val()
        var realAnswer = $("#L_realAnswer").val()
        var projectSelectId = 1
        var examYear = $("#L_examYear").val()
        var isImage = $("#L_isImage").val()
        $.ajax({
            url:'/exam/updateMathQuestionById',
            type: "get",
            data: {title:title,answerA:answerA,answerB:answerB,answerC:answerC,answerD:answerD,realAnswer:realAnswer,projectSelectId:projectSelectId,examYear:examYear,isImage:isImage,examId:1},
            success:function (){

            }
        })
    })
})